/**
 * Copyright (C) 2017 Pingan, Inc. All Rights Reserved.
 */
package com.pingan.haofang.searchcloud.common.context;

import java.io.Serializable;
import java.util.List;

/**
 * 登录用户信息
 *
 * @author LIUJUNJUN
 * @date 2017年2月22日
 * @since 1.0.0
 */
public class Visitor implements Serializable {

    /**
     * 用户ID
     */
    private long userId;

    /**
     * 用户名
     */
    private String userName;

    /**
     * 角色
     *
     */
    private int role;

    /**
     * 有权限的projectId
     */
    private List<Long> ownProjectIdList;

    /**
     * IP
     */
    private String currentIp;

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public List<Long> getOwnProjectIdList() {
        return ownProjectIdList;
    }

    public void setOwnProjectIdList(List<Long> ownProjectIdList) {
        this.ownProjectIdList = ownProjectIdList;
    }

    public int getRole() {
        return role;
    }

    public void setRole(int role) {
        this.role = role;
    }

    public String getCurrentIp() {
        return currentIp;
    }

    public void setCurrentIp(String currentIp) {
        this.currentIp = currentIp;
    }

    @Override
    public String toString() {
        return "Visitor{" +
                "userId=" + userId +
                ", userName='" + userName + '\'' +
                ", role=" + role +
                ", ownProjectIdList=" + ownProjectIdList +
                ", currentIp='" + currentIp + '\'' +
                '}';
    }
}